$(function() {

	//轮播图
	var slider = new Swiper('.index-slider .swiper-container', {
		slidesPerView: 1,
		loop: true,
		centeredSlides: true,
		autoHeight: true,
		autoplay: {
			delay: 5000,
			disableOnInteraction: false,
		},
		pagination: {
			el: '.index-slider .swiper-pagination',
			clickable: true,
		},
	});

	//项目案例
	var platform = new Swiper('.platform-list .swiper-container', {
		slidesPerView: 3,
		spaceBetween: 21,
		observer: true,
		observeParents: true,
		navigation: {
			nextEl: '.platform-list .swiper-button-next',
			prevEl: '.platform-list .swiper-button-prev',
          disabledClass: 'my-button-disabled',
		},
		breakpoints: {
			1024: {
				slidesPerView: 3,
				spaceBetween: 21,
			},
			768: {
				slidesPerView: 2,
				spaceBetween: 20,
			},
			767: {
				slidesPerView: 1,
				spaceBetween: 10,
			}
		}
	});
	$(".more_app ul li").click(function() {
		$(this).addClass("active").siblings().removeClass("active");
		$(".platform-box .platform-list").eq($(this).index()).addClass("active").siblings().removeClass("active");
	});

	$(".tab_menu li").click(function() {
		$(this).addClass("active").siblings().removeClass("active");
		var _index2 = $(this).index();
		$(".case-box .platform-list").eq(_index2).addClass("active").siblings().removeClass("active");
	});

	//开发流程
	$(".i-process .item-btn").eq(0).addClass("cur")
	var LightNum = 0,
		LightAuto = setInterval(function() {
			LightNum++;
			if (LightNum == $(".i-process .item-btn").length) {
				LightNum = 0
			}
			$(".i-process .item-btn").eq(LightNum).addClass("cur").siblings().removeClass("cur")

		}, 3000);

	//新闻中心
	var newswiper = new Swiper('.news-content .swiper-container', {
		slidesPerView: 3,
		paginationClickable: true,
		spaceBetween: 50,
		pagination: {
			el: '.news-content .swiper-pagination',
			clickable: true,
		},
		breakpoints: {
			1024: {
				slidesPerView: 3,
				spaceBetween: 50,
			},
			768: {
				slidesPerView: 2,
				spaceBetween: 30,
			},
			767: {
				slidesPerView: 1,
				spaceBetween: 0,
			}
		}
	});

//新闻中心
	var prswiper = new Swiper('.server_box .swiper-container', {
		slidesPerView: 1,
		paginationClickable: true,
		pagination: {
			el: '.server_box .swiper-pagination',
			clickable: true,
		},
	});
	
	// 关于我们手机端
	$(".about-nav ul li").click(function() {
		$(this).addClass("on").siblings().removeClass("on");
		var _index3 = $(this).index();
		$(".slide-about .about-item").eq(_index3).addClass("on").siblings().removeClass("on");
	});
	
	
	//关注微信弹框
	$('.ClickMe').click(function() {
		var wh = $(document).height();
		if (wh < $(window).height()) {
			wh = $(window).height();
		}
		$('html,body').addClass('ovfHiden');
		$('.goodcover').show();
		$('.goodcover').css("height", wh);
		$('.wxcode').show();
	})
	$('.cd-close').click(function() {
		$('html,body').removeClass('ovfHiden');
		$('.wxcode').hide();
		$('.goodcover').hide();
	});

	//返回顶部
	$(function() {
		$(window).scroll(function() {
			var _top = $(window).scrollTop();
			if (_top > 300) {
				$('.back_top').fadeIn(600);
			} else {
				$('.back_top').fadeOut(600);
			}
		});
		$(".back_top").click(function() {
			$("html,body").animate({
				scrollTop: 0
			}, 500);
		});
	});



});
